package com.wx.service;

import java.awt.List;
import java.util.ArrayList;

import com.wx.msg.MessageResponse;
import com.wx.msg.resp.Article;

/**
 * 
 * 创建人：herosky   
 * 创建时间：2015-3-30 下午5:13:57   
 * 描述：菜单点击事件，处理
 *
 */
public class MenuClickService {

	/**
	 * 
	 * 描述：@param eventKey
	 * 描述：@param fromUserName
	 * 描述：@param toUserName
	 * 描述：@return 接受用户点击事件，通过微信推送给用户消息，跳转页面，发送消息等
	 * 作者：herosky
	 */
	public static String getClickResponse(String eventKey, String fromUserName,
			String toUserName) {
		String responseContent = "";
		// TODO 判断evetKey事件处理
		if(eventKey.equals("oneClick-2")){
			Article article = new Article();
			article.setTitle("测试图文信息");
			article.setPicUrl("https://mmbiz.qlogo.cn/mmbiz/g08KSz2wl8NHLm4ngLCHXdS7s4IK3ZO74chHqQTowA8qy1svr9oBGcJHuo9Ogsl9dRibib5SeveQTt9iahRFKVAkA/0?wx_fmt=gif");
			article.setUrl("http://www.yimihome.com/software_function.jsp?dirCode=rjgn_gnlb&childCode=rjgn_gnlb_PC");
			
			ArrayList list = new ArrayList();
			list.add(article);
			
			responseContent = MessageResponse.getNewsMessage(fromUserName, toUserName, list);
		}
		
		//测试返回永久素材
		String mediaId = "ahXlJT5o2dl5I-iIfixDG71q7fsAsFP5NMdFr0VeXoA";
		responseContent = MessageResponse.getImageMessage(fromUserName, toUserName, mediaId);
		//end
		
		return responseContent;
	}

}
